package com.iter.devbox.pattern.iterator;

import java.util.ArrayList;
import java.util.List;

/**具体容器*/
public class ConcreteAggregate implements Aggregate {
	public List<Object> list = new ArrayList<Object>();
	@Override
	public boolean add(Object object) {
		return list.add(object);
	}

	@Override
	public boolean remove(Object object) {
		return list.remove(object);
	}

	@Override
	public Iterator iterator() {
		return new ConcreteIterator(list);
	}
}
